package com.jie.deletefile.design;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.widget.ListView;

import com.jie.deletefile.R;

import java.util.ArrayList;
import java.util.List;

public class ToolbarActivity extends AppCompatActivity {

    private Toolbar tb;
    private ListView t_lv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_toolbar);
        initView();
    }

    private void initView() {
        tb = (Toolbar) findViewById(R.id.tb);
        List<String> datas = getdatas();
        tb.setTitle("这是一个toolbar");
        setSupportActionBar(tb);

    }

    private List<String> getdatas() {
        List<String> data = new ArrayList<>();
        for (int i = 0; i < 30; i++) {
            data.add("条目" + i);
        }
        return data;
    }
}
